#include <Architect.hpp>
#include "Angleroads.hpp"

Angleroads::Angleroads()
{
  style = CLASSIC;
  east = south = true;
}

void Angleroads::setBuiltIn()
{
  int roadSize = 8.0; // FIXME : make as parameter of connections
  bv = new AABB(100/*taille plus haut immeuble*/, size, size);
  
  StreetBloc* b1 = dynamic_cast<StreetBloc*>(archi->get("G_STREETBORDER"));
  b1->set(size/2-roadSize/2, size, minLvl, maxLvl);
  addAsset(b1);
  
  StreetBloc* b2 = dynamic_cast<StreetBloc*>(archi->get("G_STREETBORDER"));
  b2->set(size/2-roadSize/2, size/2+roadSize/2, minLvl, maxLvl);
  b2->rotateOf(0,0,-90);
  b2->translateOf(size/2-roadSize/2,size,0);
  addAsset(b2);

  StreetBloc* b3 = dynamic_cast<StreetBloc*>(archi->get("G_STREETCORNER"));
  b3->set(size/2-roadSize/2, size/2-roadSize/2, minLvl, maxLvl);
  b3->rotateOf(0,0,90);
  b3->translateOf(size,0,0);
  addAsset(b3);
}
